import Layout from '@/layout'

/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
 */

export const adminRoutes = [
  // 欢迎页
  {
    path: '/home',
    redirect: '/home/welcome',
    component: Layout,
    meta: {
      title: '后台首页',
      icon: 'el-icon-s-home'
    },
    children: [
      {
        path: 'welcome',
        name: 'welcome',
        component: () => import('@/pages/home/welcome'),
        hidden: true,
        meta: {
          title: '欢迎页'
        }
      }
    ]
  },
  // 部门管理
  {
    path: '/customer',
    redirect: '/customer/customerInput',
    component: Layout,
    meta: {
      title: '网站管理',
      icon: 'el-icon-s-platform'
    },
    children: [
      {
        path: 'customerInput',
        name: 'customerInputIndex',
        component: () => import('@/pages/customer/news'),
        meta: {
          title: '新闻管理',
          icon:'el-icon-postcard'
        }
      },
      {
        path: 'lunbotu',
        name: 'lunbotu',
        component: () => import('@/pages/customer/lunbotu'),
        meta: {
          title: '轮播图管理',
          icon:'el-icon-picture-outline-round'
        }
      },
      {
        path: 'leaderCare',
        name: 'leaderCare',
        component: () => import('@/pages/customer/leaderCare'),
        hidden: false,
        meta: {
          title: '领导关怀',
          icon:'el-icon-umbrella'
        }
      },
      {
        path: 'jiuye',
        name: 'jiuye',
        component: () => import('@/pages/customer/jiuye'),
        hidden: false,
        meta: {
          title: '招生就业',
          icon:'el-icon-medal'
        }
      },
      {
        path: 'zhaopin',
        name: 'zhaopin',
        component: () => import('@/pages/customer/zhaopin'),
        hidden: false,
        meta: {
          title: '招聘信息',
          icon:'el-icon-document'
        }
      },
      {
        path: 'hezuo',
        name: 'hezuo',
        component: () => import('@/pages/customer/hezuo'),
        hidden: false,
        meta: {
          title: '合作交流',
          icon:'el-icon-office-building'
        }
      }
    ]
  },
  // 系统设置
  {
    path: '/system',
    redirect: '/system/steup',
    component: Layout,
    meta: {
      title: '系统设置',
      icon: 'el-icon-s-tools'
    },
    children: [
      {
        path: 'steup',
        name: 'steup',
        component: () => import('@/pages/system/steup'),
        hidden: false,
        meta: {
          title: '账号管理',
          icon:'el-icon-user'
        }
      }
    ]
  }
]